A cryptographic hash function is an algorithm that takes an arbitrary block of data as input and generates and returns a hash digest (also known as (a.k.a.) a hash value, cryptographic hash value, or digest), which is a fixed-size bit string. A cryptographic hash function generates the hash digest so that an accidental or intentional change to the input data will, with a very high probability, change the hash digest. Furthermore, a cryptographic hash function is an avalanche function because a substantially small difference (e.g., even a difference of one bit) in the input to the function results in a substantially large (i.e., highly non-linear) difference in the digest. Cryptographic hash functions include Secure Hash Algorithm (SHA) functions and Message Digest (MD) functions. Examples of cryptographic hash functions and the size of their respective hash digests are included in Table 1.
TABLE 1Cryptographic Hash FunctionSize(s) of Hash Digest (bits)GOST256HAVAL256/224/192/160/128MD2128MD4128MD5128PANAMA256RadioGatúnUp to 19 wordsRACE Integrity Primitives Evaluation128Message Digest (RIPEMD)RIPEMD-128/256128/256RIPEMD-160/320160/320SHA-0160SHA-1160SHA-256/224256/224SHA-512/384512/384Tiger(2)-192/160/128192/160/128WHIRLPOOL512
Network communication devices use communication protocols to send communication (i.e., data) packages from a sending network device (i.e., sender) to a receiving network device (i.e., receiver or recipient). According to known communication protocols, such as Transmission Control Protocol over Internet Protocol (TCP/IP), Fibre Channel over Ethernet (FCoE), Small Computer System Interface (SCSI), Internet SCSI (iSCSI), Serial-Attached-SCSI (SAS), Infiniband, and Ethernet, communication packages include fields for metadata and payload data. The metadata and payload data fields are defined by protocol standards according to the Open Systems Interconnection (OSI) network layer model. Certain metadata fields are used to store a checksum of the payload data, which allows performing integrity checking. The sending network device calculates and adds the checksum to the metadata, and sends the payload data and the metadata that includes the checksum to the receiving network device. After receiving the payload data and the metadata that includes the checksum, the receiving network device calculates the checksum of the received payload data and compares the result against the checksum included in the received metadata to guarantee data integrity. Known checksums are based on cyclic codes such as a Cyclic Redundancy Check (CRC).